# -*- coding: utf-8 -*-
from datetime import timedelta
from utils.operators.cluster_for_spark_sql_operator import SparkSqlOperator


jms_dwd__dwd_yl_oms_oms_waybill_incre_parse_hi = SparkSqlOperator(
    task_id='jms_dwd__dwd_yl_oms_oms_waybill_incre_parse_hi',
    email=['yushuo@jtexpress.com','yl_bigdata@yl-scm.com'],
    master='yarn',
    name='jms_dwd__dwd_yl_oms_oms_waybill_incre_parse_hi_{{ execution_date | cst_hour }}',
    sql='jms_point_hi/dwd/dwd_yl_oms_oms_waybill_incre_parse_hi/execute.sql',
    pool_slots=2,
    driver_cores=2 ,
    driver_memory='8g' ,
    executor_cores=4 ,
    executor_memory='16G' ,
    num_executors=40 ,
    conf={'spark.dynamicAllocation.enabled'                  : 'true',
          'spark.shuffle.service.enabled'                    : 'true',
        'spark.dynamicAllocation.maxExecutors'             : 50 ,
          'spark.dynamicAllocation.cachedExecutorIdleTimeout': 600,
          'spark.network.timeout' : 600,
          'spark.sql.sources.partitionOverwriteMode'         : 'dynamic',
        'spark.executor.memoryOverhead'             : '1G' , 
          'spark.sql.shuffle.partitions'                     : 1000
          },
    hiveconf={'hive.exec.dynamic.partition'             : 'true',  # 动态分区
              'hive.exec.dynamic.partition.mode'        : 'nonstrict',
              'hive.exec.max.dynamic.partitions'        : 200,  # 最大分区
              'hive.exec.max.dynamic.partitions.pernode': 200,  # 最大分区
              },
    yarn_queue='pro',
    execution_timeout=timedelta(minutes=40),
    retries=0,
    sla=timedelta(hours=1))


jms_dwd__dwd_yl_oms_oms_waybill_incre_parse_hi



